* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.2;
    margin: 0;
    
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.header {
    background: #1e293b;
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 1.0em;
    margin-bottom: 4px;
    opacity: 0.9;
    font-weight: 400;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
    font-weight: 300;
    font-style: italic;
}

.main-content {
    padding: 25px 30px;
    background: white;
    flex: 1;
}

.search-section {
    margin-bottom: 25px;
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 14px 25px 14px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.95em;
    background: #f8fafc;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #1e293b;
}

.search-input::placeholder {
    color: #64748b;
    opacity: 0.7;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.2em;
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.1em;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1;
}

.clear-search-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-50%) scale(1.1);
}

.clear-search-btn.visible {
    display: flex;
}

.search-help {
    margin-top: 10px;
    text-align: center;
    font-size: 0.8em;
    color: #64748b;
    font-style: italic;
}

.main-view {
    display: block;
}

.detail-view {
    display: none;
}

.poles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.pole-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    overflow: visible;
}

.pole-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.pole1-card {
    border-color: #2563eb;
}

.pole1-card:hover {
    border-color: #1d4ed8;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.15);
}

.pole2-card {
    border-color: #16a34a;
}

.pole2-card:hover {
    border-color: #15803d;
    box-shadow: 0 16px 40px rgba(22, 163, 74, 0.15);
}

.pole3-card {
    border-color: #ea580c;
}

.pole3-card:hover {
    border-color: #dc2626;
    box-shadow: 0 16px 40px rgba(234, 88, 12, 0.15);
}

.pole4-card {
    border-color: #78909c;
}

.pole4-card:hover {
    border-color: #546e7a;
    box-shadow: 0 16px 40px rgba(234, 88, 12, 0.15);
}


.pole-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    border-radius: 16px 16px 0 0;
    transition: all 0.3s ease;
}

.pole1-card::before {
    background: #2563eb;
}

.pole2-card::before {
    background: #16a34a;
}

.pole3-card::before {
    background: #ea580c;
}

.pole4-card::before {
    background: #546e7a;
}

.pole-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.pole-number {
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.0em;
    margin-right: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.pole1-card .pole-number {
    background: #2563eb;
}

.pole2-card .pole-number {
    background: #16a34a;
}

.pole3-card .pole-number {
    background: #ea580c;
}

.pole4-card .pole-number {
    background: #546e7a;
}


.pole-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.1;
}

.pole-description {
    color: #475569;
    margin-bottom: 14px;
    font-size: 0.9em;
    line-height: 1.3;
}

.pole-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
}

.tag {
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pole1-card .tag {
    background: #2563eb;
}

.pole1-card .tag:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.pole2-card .tag {
    background: #16a34a;
}

.pole2-card .tag:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.pole3-card .tag {
    background: #ea580c;
}

.pole3-card .tag:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.pole4-card .tag {
    background: #78909c;
}

.pole4-card .tag:hover {
    background: #546e7a;
    transform: translateY(-1px);
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.back-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.2);
}

.back-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(99, 102, 241, 0.3);
}

.detail-title {
    color: #1e293b;
    font-size: 1.6em;
    margin: 0;
    font-weight: 600;
    flex: 1;
}

.search-indicator {
    display: flex;
    align-items: center;
}

.search-indicator span {
    background: #3b82f6;
    color: white;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.8em;
    font-weight: 600;
    animation: fadeIn 0.5s ease-out;
}

.competences-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
}

/* Section header pour les tâches */
.section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    font-size: 1.2em;
}

/* Grille de cartes de tâches */
.tasks-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

/* Grille pour 5 tâches - 1 ligne de 5 */
.tasks-grid.tasks-5 {
    grid-template-columns: repeat(5, 1fr);
    margin-top: 40px;
}

/* Grille pour 6 tâches - 2 lignes de 3 */
.tasks-grid.tasks-6 {
    grid-template-columns: repeat(3, 1fr);
}

/* Grille pour 8 tâches - 2 lignes de 4 */
.tasks-grid.tasks-8 {
    grid-template-columns: repeat(4, 1fr);
}

/* Carte de tâche individuelle - Design sobre et professionnel */
.task-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e1;
    z-index: 10000;  /* AJOUTER CETTE LIGNE */
    position: relative;  /* AJOUTER CETTE LIGNE */
}

/* Styles spécifiques par bloc */
.pole1-detail .task-card {
    border-left: 5px solid #2563eb;
}

.pole1-detail .task-card:hover {
    border-left-color: #1d4ed8;
    background: #f8faff;
}

.pole1-detail .task-card.highlighted {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-color: #3b82f6;
    border-left-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.pole2-detail .task-card {
    border-left: 5px solid #16a34a;
}

.pole2-detail .task-card:hover {
    border-left-color: #15803d;
    background: #f6fef9;
}

.pole2-detail .task-card.highlighted {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #22c55e;
    border-left-color: #16a34a;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.25);
}

.pole3-detail .task-card {
    border-left: 5px solid #ea580c;
}

.pole3-detail .task-card:hover {
    border-left-color: #c2410c;
    background: #fff7ed;
}

.pole3-detail .task-card.highlighted {
    background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%);
    border-color: #f97316;
    border-left-color: #ea580c;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.25);
}

/* Style pour le texte surligné dans les résultats de recherche */
.task-title mark {
    background-color: #fef08a;
    color: #854d0e;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

.task-title mark.primary-match {
    background-color: #ffd700 !important;
    color: #1e293b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.task-title mark.synonym-match {
    background-color: #87ceeb !important;
    color: #1e293b;
    padding: 1px 3px;
    border-radius: 2px;
}

/* Styles pour les mots surlignés dans les infobulles */
.tooltip-content mark.primary-match {
    background-color: #ffd700 !important;
    color: #1e293b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.tooltip-content mark.synonym-match {
    background-color: #87ceeb !important;
    color: #1e293b;
    padding: 1px 3px;
    border-radius: 2px;
}

.task-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.competence-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.competence-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pole1-detail .competence-card {
    border-left: 4px solid #2563eb;
}

.pole1-detail .competence-card .competence-number {
    background: #2563eb;
}

.pole2-detail .competence-card {
    border-left: 4px solid #16a34a;
}

.pole2-detail .competence-card .competence-number {
    background: #16a34a;
}

.pole3-detail .competence-card {
    border-left: 4px solid #ea580c;
}

.pole3-detail .competence-card .competence-number {
    background: #ea580c;
}

.pole4-detail .competence-card {
    border-left: 4px solid #546e7a;
}

.pole4-detail .competence-card .competence-number {
    background: #546e7a;
}



.competence-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.competence-number {
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.competence-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.activities-list {
    list-style: none;
    margin-top: 16px;
}

.activity-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    position: relative;
    padding-left: 18px;
    font-size: 0.88em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.2;
    cursor: help;
}

.activity-item::before {
    content: '◆';
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.0em;
}

.pole1-detail .activity-item::before {
    color: #2563eb;
}

.pole2-detail .activity-item::before {
    color: #16a34a;
}

.pole3-detail .activity-item::before {
    color: #ea580c;
}

.pole4-detail .activity-item::before {
    color: #78909c;
}


.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    color: #1e293b;
    background: #f8fafc;
    margin: 0 -10px;
    padding: 8px 10px 8px 28px;
    border-radius: 6px;
}

.tooltip {
    position: relative;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(50% + 2px);
    left: 50%;
   
    transform: translateX(-50%);
    color: #1e293b;
    padding: 8px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    line-height: 1.1;
    width: 400px;
    max-width: 95vw;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    pointer-events: none;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}





/* Assurer que le tooltip reste visible */
.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Ajustement pour écrans moyens */
@media (max-width: 1200px) {
    .tooltip-content {
        width: 320px;
    }
}

/* Ajustement pour tablettes */
@media (max-width: 768px) {
    .tooltip-content {
        width: 280px;
        max-width: 90vw;
        font-size: 0.8em;
        padding: 12px 14px;
    }
}

/* Ajustement pour mobiles */
@media (max-width: 480px) {
    .tooltip-content {
        width: 250px;
        max-width: 85vw;
        font-size: 0.75em;
        padding: 10px 12px;
    }
}

.pole1-bulle {
    background: #dbeafe;
    border: 2px solid #93c5fd;
}

.pole2-bulle {
    background: #d1fae5;
    border: 2px solid #86efac;
}

.pole3-bulle {
    background: #fed7aa;
    border: 2px solid #fdba74;
    width: 420px;
}


.pole4-bulle {
    background: #eceff1;
    border: 2px solid #90a4ae;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    border: 6px solid transparent;
    left: 50%;
    transform: translateX(-50%);
}

.pole4-detail .tooltip-content::after {
    border-top-color: #90a4ae;
}

.pole3-detail .tooltip-content::after {
    border-top-color: #fdba74;
}

.pole2-detail .tooltip-content::after {
    border-top-color: #86efac;
}

.pole1-detail .tooltip-content::after {
    border-top-color: #93c5fd;
}

.tooltip-title {
    font-weight: 700;
    font-size: 1.05em;
    margin-bottom: 6px;
    color: #1e293b;
}

.tooltip-savoirs {
    line-height: 1.5;
}

.tooltip-savoirs strong {
    display: block;
    margin-top: 8px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #0f172a;
}

.tooltip-savoirs strong:first-child {
    margin-top: 0;
}

.tooltip-title {
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 6px;
    font-size: 1.1em;
    border-bottom: 0.5px solid #64748b;
}

.tooltip-competence {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #94a3b8;
}

.tooltip-savoirs {
    font-size: 0.95em;
    color: #1e293b;
    margin-bottom: 4px;
    margin-top: 6px;
}

.tooltip-savoirs * {
    color: #1e293b;
}

.tooltip-savoirs strong {
    color: #ea580c;
    display: block;
    margin-bottom: 1px;
}

.highlighted {
    background: #f0f9ff !important;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.15) !important;
}

.pole1-detail .highlighted {
    border-left-color: #1d4ed8 !important;
}

.pole2-detail .highlighted {
    border-left-color: #15803d !important;
}

.pole3-detail .highlighted {
    border-left-color: #dc2626 !important;
}

.pole4-detail .highlighted {
    border-left-color: #546e7a !important;
}


.highlighted-activity {
    background: #dbeafe !important;
    color: #1e40af !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    margin: 0 -10px !important;
    padding: 8px 10px 8px 28px !important;
    border-bottom: 1px solid #bfdbfe !important;
}

.result-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8em;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
    animation: pulse 2s infinite;
    cursor: help;
}

.has-results {
    background: #f0f9ff !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.15) !important;
}

mark {
    background: #fbbf24;
    color: #1e293b;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.no-results {
    text-align: center;
    padding: 40px 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    margin: 20px 0;
}

.no-results-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-results h3 {
    color: #475569;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

.no-results p {
    color: #64748b;
    font-size: 0.9em;
    max-width: 400px;
    margin: 0 auto;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.suggestion-tag {
    background: #e2e8f0;
    color: #475569;
    padding: 6px 14px;
    margin: 2px;
    border-radius: 16px;
    display: inline-block;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.suggestion-tag:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes attention {
    0%, 100% {
        transform: translateY(-2px) scale(1);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 12px 35px rgba(59, 130, 246, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px 16px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .main-content {
        padding: 20px 16px;
    }

    .poles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .competences-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pole-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pole-number {
        margin-right: 0;
    }

    .search-input {
        padding: 12px 16px 12px 45px;
    }

    .pole-card {
        padding: 18px;
    }

    .competence-card {
        padding: 16px;
    }

    .tooltip-content {
        width: 270px;
    }

    .detail-title {
        font-size: 1.4em;
    }
}

.footer {
    text-align: center;
    padding: 14px;
    color: #6b7280;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
    margin-bottom: 20px;
    background: white;
    border-radius: 6px;

    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
}

/* ===================================================================
   TOOLTIPS DES TAGS - CONFINÉS DANS LA POLE-CARD
   =================================================================== */

.tag-tooltip {
    position: relative;
    cursor: help;
}

.tag-tooltip::before,
.tag-tooltip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

/* Bulle du tooltip - reste dans la pole-card */
.tag-tooltip::before {
    content: attr(data-examples);
    bottom: calc(100% + 15px);
    left: 50%;
    top: 50%;
    transform: translateX(-50%) scale(0.95);
    padding: 8px 10px;
    font-size: 0.72rem;
    line-height: 1.4;
    border-radius: 6px;
    white-space: pre-line;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Flèche du tooltip */
.tag-tooltip::after {
    content: '';
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    display: none; 
}

/* COULEURS selon le pôle */
.pole1-card .tag-tooltip::before {
    background: #dbeafe;
    border: 2px solid #93c5fd;
    color: #1e293b;
}

.pole1-card .tag-tooltip::after {
    border-top-color: #93c5fd;
}

.pole2-card .tag-tooltip::before {
    background: #d1fae5;
    border: 2px solid #86efac;
    color: #1e293b;
}

.pole2-card .tag-tooltip::after {
    border-top-color: #86efac;
}

.pole3-card .tag-tooltip::before {
    background: #fed7aa;
    border: 2px solid #fdba74;
    color: #1e293b;
}

.pole3-card .tag-tooltip::after {
    border-top-color: #fdba74;
}

.pole4-card .tag-tooltip::before {
    background: #eceff1;
    border: 2px solid #90a4ae;
    color: #1e293b;
}

.pole4-card .tag-tooltip::after {
    border-top-color: #90a4ae;
}




/* Animation au survol */
.tag-tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.tag-tooltip:hover::after {
    opacity: 1;
}

.tag-tooltip:hover {
    transform: translateY(-2px);
}

/* Positionnement pour les tags en début de ligne */
.pole-tags .tag-tooltip:nth-child(1)::before,
.pole-tags .tag-tooltip:nth-child(2)::before {
    left: 0;
    transform: translateX(0) scale(0.95);
}

.pole-tags .tag-tooltip:nth-child(1)::after,
.pole-tags .tag-tooltip:nth-child(2)::after {
    left: 20px;
    transform: translateX(0);
}

.pole-tags .tag-tooltip:nth-child(1):hover::before,
.pole-tags .tag-tooltip:nth-child(2):hover::before {
    transform: translateX(0) scale(1);
}

/* Positionnement pour les tags en fin de ligne */
.pole-tags .tag-tooltip:nth-last-child(1)::before,
.pole-tags .tag-tooltip:nth-last-child(2)::before {
    left: auto;
    right: 0;
    transform: translateX(0) scale(0.95);
}

.pole-tags .tag-tooltip:nth-last-child(1)::after,
.pole-tags .tag-tooltip:nth-last-child(2)::after {
    left: auto;
    right: 20px;
    transform: translateX(0);
}

.pole-tags .tag-tooltip:nth-last-child(1):hover::before,
.pole-tags .tag-tooltip:nth-last-child(2):hover::before {
    transform: translateX(0) scale(1);
}

/* Mobile - adaptation */
@media (max-width: 768px) {
    .tag-tooltip::before {
        max-width: 200px;
        font-size: 0.68rem;
        padding: 6px 8px;
    }
    
    .tag-tooltip::after {
        border-width: 4px;
    }
    
    /* Tous les tags s'alignent à gauche sur mobile */
    .pole-tags .tag-tooltip::before {
        left: 0;
        transform: translateX(0) scale(0.95);
    }
    
    .pole-tags .tag-tooltip::after {
        left: 16px;
        transform: translateX(0);
    }
    
    .pole-tags .tag-tooltip:hover::before {
        transform: translateX(0) scale(1);
    }
}